package com.ciaojian.core.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;

import java.util.Date;
import java.io.Serializable;

/**
 * <p>
 *
 * </p>
 *
 * @author
 * @since 2022-11-29
 */
@TableName("d_dy_user")
@Data
public class DyUser extends Model<DyUser> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 手机号码
     */
    private String telphone;

    /**
     * 注册时间
     */
    @TableField("add_time")
    private Date addTime;

    /**
     * 小程序openid
     */
    private String openid;

    private String unionid;

    /**
     * 匿名用户小程序openid
     */

    private String anonymousOpenid;

    /**
     * 抖音名
     */
    @TableField("nickName")
    private String nickName;

    /**
     * 抖音头像
     */
    @TableField("avatarUrl")
    private String avatarUrl;

    /**
     * 姓名
     */
    private String name;

    /**
     * 性别
     */
    private Integer gender;

    /**
     * 年龄
     */
    private Integer age;

    /**
     * 城市
     */
    private String city;

    /**
     * 省份
     */
    private String province;

    /**
     * 生日
     */
    private Date born;

    /**
     * 今天是否登陆1是0不是
     */
    @TableField("is_login")
    private Integer isLogin;

    @TableField("update_time")
    private Date updateTime;

    /**
     * 是否首次购买   0否 1是
     */
    @TableField("is_shop")
    private Integer isShop;

    /**
     * 是否微信用户 0否 1是
     */
    @TableField("is_wx")
    private Integer isWx;

    /**
     * 用户id
     */
    @TableField("wx_user_id")
    private Integer wxUserId;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "DDyUser{" +
                "id=" + id +
                ", telphone=" + telphone +
                ", addTime=" + addTime +
                ", openid=" + openid +
                ", unionid=" + unionid +
                ", nickName=" + nickName +
                ", avatarUrl=" + avatarUrl +
                ", name=" + name +
                ", gender=" + gender +
                ", age=" + age +
                ", city=" + city +
                ", province=" + province +
                ", born=" + born +
                ", isLogin=" + isLogin +
                ", updateTime=" + updateTime +
                ", isShop=" + isShop +
                ", isWx=" + isWx +
                ", wxUserId=" + wxUserId +
                "}";
    }
}
